package com.rolerealm.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * 用户行为数据实体
 * 
 * @author RoleRealm Team
 * @version 1.0.0
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("user_interactions")
public class UserInteractionEntity {

    /**
     * ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 用户ID
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 角色ID
     */
    @TableField("character_id")
    private Long characterId;

    /**
     * 交互类型(view/chat/favorite)
     */
    @TableField("interaction_type")
    private String interactionType;

    /**
     * 交互时长(秒)
     */
    @TableField("duration_seconds")
    private Integer durationSeconds;

    /**
     * 创建时间
     */
    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;
}
